package com.blacktech.dbu.auth.dto;

import lombok.Data;

import java.time.LocalDateTime;

/**
 * 登录响应DTO
 *
 * @author Yanyunsong
 */
@Data
public class LoginResponse {

    /**
     * 访问令牌
     */
    private String accessToken;

    /**
     * 刷新令牌
     */
    private String refreshToken;

    /**
     * 令牌类型
     */
    private String tokenType = "Bearer";

    /**
     * 访问令牌过期时间（秒）
     */
    private Long expiresIn;

    /**
     * 用户信息
     */
    private UserInfo userInfo;

    @Data
    public static class UserInfo {
        private Long id;
        private String username;
        private String displayName;
        private String email;
        private String userType;
        private String status;
        private LocalDateTime lastLoginTime;
    }
}